package output;

import java.io.FileOutputStream;
import java.io.IOException;

public class FileOutputStreamDemo2 {
    public static void main(String[] args) {
        FileOutputStream fos=null;
        try {
            System.out.println(10/0);
            fos = new FileOutputStream("G:\\Javatest2\\output\\a.txt");
            fos.write("abc".getBytes());

        }catch(IOException e){
            e.printStackTrace();
        } finally {
            if(fos!=null){
                try {
                    fos.close();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }

        }
    }
}
